home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / Quickdraw.h < prev    next >
Text File  |  1991-04-17  |  32KB  |  1,044 lines

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 9:43 PM
  4.     Quickdraw.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __QUICKDRAW__
  15. #define __QUICKDRAW__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21.  
  22. enum {
  23.  
  24.     invalColReq = -1,                   /*invalid color table request*/
  25.  
  26. /* transfer modes */
  27.     srcCopy = 0,                        /*the 16 transfer modes*/
  28.     srcOr = 1,
  29.     srcXor = 2,
  30.     srcBic = 3,
  31.     notSrcCopy = 4,
  32.     notSrcOr = 5,
  33.     notSrcXor = 6,
  34.     notSrcBic = 7,
  35.     patCopy = 8,
  36.     patOr = 9,
  37.     patXor = 10,
  38.     patBic = 11,
  39.     notPatCopy = 12,
  40.     notPatOr = 13,
  41.     notPatXor = 14,
  42.     notPatBic = 15,
  43.  
  44. /* Special Text Transfer Mode    */
  45.     grayishTextOr = 49,
  46.  
  47. /* Arithmetic transfer modes */
  48.     blend = 32,
  49.     addPin = 33
  50. };
  51. enum {
  52.     addOver = 34,
  53.     subPin = 35,
  54.     addMax = 37,
  55.     adMax = 37,
  56.     subOver = 38,
  57.     adMin = 39,
  58.     ditherCopy = 64,
  59.  
  60. /* Transparent mode constant */
  61.     transparent = 36,
  62.  
  63. /* QuickDraw color separation constants */
  64.     normalBit = 0,                      /*normal screen mapping*/
  65.     inverseBit = 1,                     /*inverse screen mapping*/
  66.     redBit = 4,                         /*RGB additive mapping*/
  67.     greenBit = 3,
  68.     blueBit = 2,
  69.     cyanBit = 8,                        /*CMYBk subtractive mapping*/
  70.     magentaBit = 7,
  71.     yellowBit = 6,
  72.     blackBit = 5,
  73.     blackColor = 33,                    /*colors expressed in these mappings*/
  74.     whiteColor = 30,
  75.     redColor = 205
  76. };
  77. enum {
  78.     greenColor = 341,
  79.     blueColor = 409,
  80.     cyanColor = 273,
  81.     magentaColor = 137,
  82.     yellowColor = 69,
  83.  
  84.     picLParen = 0,                      /*standard picture comments*/
  85.     picRParen = 1,
  86.  
  87.     normal = 0,
  88.     bold = 1,
  89.     italic = 2,
  90.     underline = 4,
  91.     outline = 8,
  92.     shadow = 0x10,
  93.     condense = 0x20,
  94.     extend = 0x40,
  95.  
  96.     clutType = 0,                       /*0 if lookup table*/
  97.     fixedType = 1,                      /*1 if fixed table*/
  98.     directType = 2,                     /*2 if direct values*/
  99.  
  100.     gdDevType = 0,                      /*0 = monochrome 1 = color*/
  101.     burstDevice = 7
  102. };
  103. enum {
  104.     ext32Device = 8,
  105.     ramInit = 10,                       /*1 if initialized from 'scrn' resource*/
  106.     mainScreen = 11,                    /* 1 if main screen */
  107.     allInit = 12,                       /* 1 if all devices initialized */
  108.     screenDevice = 13,                  /*1 if screen device [not used]*/
  109.     noDriver = 14,                      /* 1 if no driver for this GDevice */
  110.     screenActive = 15,                  /*1 if in use*/
  111.  
  112.     hiliteBit = 7,                      /*flag bit in HiliteMode (lowMem flag)*/
  113.     pHiliteBit = 0,                     /*flag bit in HiliteMode used with BitClr procedure*/
  114.  
  115.     defQDColors = 127,                  /*resource ID of clut for default QDColors*/
  116.  
  117. /* pixel type */
  118.     RGBDirect = 16,                     /* 16 & 32 bits/pixel pixelType value */
  119.  
  120. /* pmVersion values */
  121.     baseAddr32 = 4,                     /*pixmap base address is 32-bit address*/
  122.  
  123.     rgnOverflowErr = -147,              /* Region accumulation failed. Resulting region may be currupt */
  124.     insufficientStackErr = -149         /* QuickDraw could not complete the operation */
  125. };
  126.  
  127. enum {frame,paint,erase,invert,fill};
  128. typedef unsigned char GrafVerb;
  129.  
  130. enum {chunky,chunkyPlanar,planar};
  131. typedef unsigned char PixelType;
  132.  
  133.  
  134. typedef short Bits16[16];
  135.  
  136. typedef unsigned char Pattern[8];
  137. typedef Pattern *PatPtr;
  138. typedef PatPtr *PatHandle;
  139. typedef const unsigned char *ConstPatternParam;
  140.  
  141. typedef char QDByte, *QDPtr, **QDHandle;
  142.  
  143. typedef short QDErr;
  144.  
  145. enum {singleDevicesBit = 0, dontMatchSeedsBit = 1, allDevicesBit = 2};
  146. enum {singleDevices = 1 << singleDevicesBit, dontMatchSeeds = 1 << dontMatchSeedsBit,
  147.     allDevices = 1 << allDevicesBit};
  148. typedef unsigned long DeviceLoopFlags;
  149.  
  150.  
  151. struct FontInfo {
  152.     short ascent;
  153.     short descent;
  154.     short widMax;
  155.     short leading;
  156. };
  157.  
  158. typedef struct FontInfo FontInfo;
  159.  
  160. struct BitMap {
  161.     Ptr baseAddr;
  162.     short rowBytes;
  163.     Rect bounds;
  164. };
  165.  
  166. typedef struct BitMap BitMap;
  167. typedef BitMap *BitMapPtr, **BitMapHandle;
  168.  
  169. struct Cursor {
  170.     Bits16 data;
  171.     Bits16 mask;
  172.     Point hotSpot;
  173. };
  174.  
  175. typedef struct Cursor Cursor;
  176. typedef Cursor *CursPtr, **CursHandle;
  177.  
  178. struct PenState {
  179.     Point pnLoc;
  180.     Point pnSize;
  181.     short pnMode;
  182.     Pattern pnPat;
  183. };
  184.  
  185. typedef struct PenState PenState;
  186.  
  187. struct Region {
  188.     short rgnSize;                      /*size in bytes*/
  189.     Rect rgnBBox;                       /*enclosing rectangle*/
  190. };
  191.  
  192. typedef struct Region Region;
  193. typedef Region *RgnPtr, **RgnHandle;
  194.  
  195. struct Picture {
  196.     short picSize;
  197.     Rect picFrame;
  198. };
  199.  
  200. typedef struct Picture Picture;
  201. typedef Picture *PicPtr, **PicHandle;
  202.  
  203. struct Polygon {
  204.     short polySize;
  205.     Rect polyBBox;
  206.     Point polyPoints[1];
  207. };
  208.  
  209. typedef struct Polygon Polygon;
  210. typedef Polygon *PolyPtr, **PolyHandle;
  211.  
  212. struct QDProcs {
  213.     Ptr textProc;
  214.     Ptr lineProc;
  215.     Ptr rectProc;
  216.     Ptr rRectProc;
  217.     Ptr ovalProc;
  218.     Ptr arcProc;
  219.     Ptr polyProc;
  220.     Ptr rgnProc;
  221.     Ptr bitsProc;
  222.     Ptr commentProc;
  223.     Ptr txMeasProc;
  224.     Ptr getPicProc;
  225.     Ptr putPicProc;
  226. };
  227.  
  228. typedef struct QDProcs QDProcs;
  229. typedef QDProcs *QDProcsPtr;
  230.  
  231. struct GrafPort {
  232.     short device;
  233.     BitMap portBits;
  234.     Rect portRect;
  235.     RgnHandle visRgn;
  236.     RgnHandle clipRgn;
  237.     Pattern bkPat;
  238.     Pattern fillPat;
  239.     Point pnLoc;
  240.     Point pnSize;
  241.     short pnMode;
  242.     Pattern pnPat;
  243.     short pnVis;
  244.     short txFont;
  245.     Style txFace;                       /*txFace is unpacked byte but push as short*/
  246.     char filler;
  247.     short txMode;
  248.     short txSize;
  249.     Fixed spExtra;
  250.     long fgColor;
  251.     long bkColor;
  252.     short colrBit;
  253.     short patStretch;
  254.     Handle picSave;
  255.     Handle rgnSave;
  256.     Handle polySave;
  257.     QDProcsPtr grafProcs;
  258. };
  259.  
  260. typedef struct GrafPort GrafPort;
  261. typedef GrafPort *GrafPtr;
  262.  
  263.  
  264. typedef GrafPtr WindowPtr;
  265.  
  266. struct RGBColor {
  267.     unsigned short red;                 /*magnitude of red component*/
  268.     unsigned short green;               /*magnitude of green component*/
  269.     unsigned short blue;                /*magnitude of blue component*/
  270. };
  271.  
  272. typedef struct RGBColor RGBColor;
  273.  
  274.  
  275. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
  276. typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor *rgb);
  277.  
  278. struct ColorSpec {
  279.     short value;                        /*index or other value*/
  280.     RGBColor rgb;                       /*true color*/
  281. };
  282.  
  283. typedef struct ColorSpec ColorSpec;
  284. typedef ColorSpec *ColorSpecPtr;
  285.  
  286.  
  287. typedef ColorSpec CSpecArray[1];
  288.  
  289. struct ColorTable {
  290.     long ctSeed;                        /*unique identifier for table*/
  291.     short ctFlags;                      /*high bit: 0 = PixMap; 1 = device*/
  292.     short ctSize;                       /*number of entries in CTTable*/
  293.     CSpecArray ctTable;                 /*array [0..0] of ColorSpec*/
  294. };
  295.  
  296. typedef struct ColorTable ColorTable;
  297. typedef ColorTable *CTabPtr, **CTabHandle;
  298.  
  299. struct MatchRec {
  300.     unsigned short red;
  301.     unsigned short green;
  302.     unsigned short blue;
  303.     long matchData;
  304. };
  305.  
  306. typedef struct MatchRec MatchRec;
  307.  
  308. struct PixMap {
  309.     Ptr baseAddr;                       /*pointer to pixels*/
  310.     short rowBytes;                     /*offset to next line*/
  311.     Rect bounds;                        /*encloses bitmap*/
  312.     short pmVersion;                    /*pixMap version number*/
  313.     short packType;                     /*defines packing format*/
  314.     long packSize;                      /*length of pixel data*/
  315.     Fixed hRes;                         /*horiz. resolution (ppi)*/
  316.     Fixed vRes;                         /*vert. resolution (ppi)*/
  317.     short pixelType;                    /*defines pixel type*/
  318.     short pixelSize;                    /*# bits in pixel*/
  319.     short cmpCount;                     /*# components in pixel*/
  320.     short cmpSize;                      /*# bits per component*/
  321.     long planeBytes;                    /*offset to next plane*/
  322.     CTabHandle pmTable;                 /*color map for this pixMap*/
  323.     long pmReserved;                    /*for future use. MUST BE 0*/
  324. };
  325.  
  326. typedef struct PixMap PixMap;
  327. typedef PixMap *PixMapPtr, **PixMapHandle;
  328.  
  329. struct PixPat {
  330.     short patType;                      /*type of pattern*/
  331.     PixMapHandle patMap;                /*the pattern's pixMap*/
  332.     Handle patData;                     /*pixmap's data*/
  333.     Handle patXData;                    /*expanded Pattern data*/
  334.     short patXValid;                    /*flags whether expanded Pattern valid*/
  335.     Handle patXMap;                     /*Handle to expanded Pattern data*/
  336.     Pattern pat1Data;                   /*old-Style pattern/RGB color*/
  337. };
  338.  
  339. typedef struct PixPat PixPat;
  340. typedef PixPat *PixPatPtr, **PixPatHandle;
  341.  
  342. struct CCrsr {
  343.     short crsrType;                     /*type of cursor*/
  344.     PixMapHandle crsrMap;               /*the cursor's pixmap*/
  345.     Handle crsrData;                    /*cursor's data*/
  346.     Handle crsrXData;                   /*expanded cursor data*/
  347.     short crsrXValid;                   /*depth of expanded data (0 if none)*/
  348.     Handle crsrXHandle;                 /*future use*/
  349.     Bits16 crsr1Data;                   /*one-bit cursor*/
  350.     Bits16 crsrMask;                    /*cursor's mask*/
  351.     Point crsrHotSpot;                  /*cursor's hotspot*/
  352.     long crsrXTable;                    /*private*/
  353.     long crsrID;                        /*private*/
  354. };
  355.  
  356. typedef struct CCrsr CCrsr;
  357. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  358.  
  359. struct CIcon {
  360.     PixMap iconPMap;                    /*the icon's pixMap*/
  361.     BitMap iconMask;                    /*the icon's mask*/
  362.     BitMap iconBMap;                    /*the icon's bitMap*/
  363.     Handle iconData;                    /*the icon's data*/
  364.     short iconMaskData[1];              /*icon's mask and BitMap data*/
  365. };
  366.  
  367. typedef struct CIcon CIcon;
  368. typedef CIcon *CIconPtr, **CIconHandle;
  369.  
  370. struct GammaTbl {
  371.     short gVersion;                     /*gamma version number*/
  372.     short gType;                        /*gamma data type*/
  373.     short gFormulaSize;                 /*Formula data size*/
  374.     short gChanCnt;                     /*number of channels of data*/
  375.     short gDataCnt;                     /*number of values/channel*/
  376.     short gDataWidth;                   /*bits/corrected value (data packed to next larger byte size)*/
  377.     short gFormulaData[1];              /*data for formulas followed by gamma values*/
  378. };
  379.  
  380. typedef struct GammaTbl GammaTbl;
  381. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  382.  
  383. struct ITab {
  384.     long iTabSeed;                      /*copy of CTSeed from source CTable*/
  385.     short iTabRes;                      /*bits/channel resolution of iTable*/
  386.     unsigned char iTTable[1];           /*byte colortable index values*/
  387. };
  388.  
  389. typedef struct ITab ITab;
  390. typedef ITab *ITabPtr, **ITabHandle;
  391.  
  392. struct SProcRec {
  393.     Handle nxtSrch;                     /*SProcHndl Handle to next SProcRec*/
  394.     ColorSearchProcPtr srchProc;        /*pointer to search procedure*/
  395. };
  396.  
  397. typedef struct SProcRec SProcRec;
  398. typedef SProcRec *SProcPtr, **SProcHndl;
  399.  
  400. struct CProcRec {
  401.     Handle nxtComp;                     /*CProcHndl Handle to next CProcRec*/
  402.     ColorComplementProcPtr compProc;    /*pointer to complement procedure*/
  403. };
  404.  
  405. typedef struct CProcRec CProcRec;
  406. typedef CProcRec *CProcPtr, **CProcHndl;
  407.  
  408. struct GDevice {
  409.     short gdRefNum;                     /*driver's unit number*/
  410.     short gdID;                         /*client ID for search procs*/
  411.     short gdType;                       /*fixed/CLUT/direct*/
  412.     ITabHandle gdITable;                /*Handle to inverse lookup table*/
  413.     short gdResPref;                    /*preferred resolution of GDITable*/
  414.     SProcHndl gdSearchProc;             /*search proc list head*/
  415.     CProcHndl gdCompProc;               /*complement proc list*/
  416.     short gdFlags;                      /*grafDevice flags word*/
  417.     PixMapHandle gdPMap;                /*describing pixMap*/
  418.     long gdRefCon;                      /*reference value*/
  419.     Handle gdNextGD;                    /*GDHandle Handle of next gDevice*/
  420.     Rect gdRect;                        /* device's bounds in global coordinates*/
  421.     long gdMode;                        /*device's current mode*/
  422.     short gdCCBytes;                    /*depth of expanded cursor data*/
  423.     short gdCCDepth;                    /*depth of expanded cursor data*/
  424.     Handle gdCCXData;                   /*Handle to cursor's expanded data*/
  425.     Handle gdCCXMask;                   /*Handle to cursor's expanded mask*/
  426.     long gdReserved;                    /*future use. MUST BE 0*/
  427. };
  428.  
  429. typedef struct GDevice GDevice;
  430. typedef GDevice *GDPtr, **GDHandle;
  431.  
  432. struct GrafVars {
  433.     RGBColor rgbOpColor;                /*color for addPin  subPin and average*/
  434.     RGBColor rgbHiliteColor;            /*color for hiliting*/
  435.     Handle pmFgColor;                   /*palette Handle for foreground color*/
  436.     short pmFgIndex;                    /*index value for foreground*/
  437.     Handle pmBkColor;                   /*palette Handle for background color*/
  438.     short pmBkIndex;                    /*index value for background*/
  439.     short pmFlags;                      /*flags for Palette Manager*/
  440. };
  441.  
  442. typedef struct GrafVars GrafVars;
  443. typedef GrafVars *GVarPtr, **GVarHandle;
  444.  
  445. struct CQDProcs {
  446.     Ptr textProc;
  447.     Ptr lineProc;
  448.     Ptr rectProc;
  449.     Ptr rRectProc;
  450.     Ptr ovalProc;
  451.     Ptr arcProc;
  452.     Ptr polyProc;
  453.     Ptr rgnProc;
  454.     Ptr bitsProc;
  455.     Ptr commentProc;
  456.     Ptr txMeasProc;
  457.     Ptr getPicProc;
  458.     Ptr putPicProc;
  459.     Ptr opcodeProc;                     /*fields added to QDProcs*/
  460.     Ptr newProc1;
  461.     Ptr newProc2;
  462.     Ptr newProc3;
  463.     Ptr newProc4;
  464.     Ptr newProc5;
  465.     Ptr newProc6;
  466. };
  467.  
  468. typedef struct CQDProcs CQDProcs;
  469. typedef CQDProcs *CQDProcsPtr;
  470.  
  471. struct CGrafPort {
  472.     short device;
  473.     PixMapHandle portPixMap;            /*port's pixel map*/
  474.     short portVersion;                  /*high 2 bits always set*/
  475.     Handle grafVars;                    /*Handle to more fields*/
  476.     short chExtra;                      /*character extra*/
  477.     short pnLocHFrac;                   /*pen fraction*/
  478.     Rect portRect;
  479.     RgnHandle visRgn;
  480.     RgnHandle clipRgn;
  481.     PixPatHandle bkPixPat;              /*background pattern*/
  482.     RGBColor rgbFgColor;                /*RGB components of fg*/
  483.     RGBColor rgbBkColor;                /*RGB components of bk*/
  484.     Point pnLoc;
  485.     Point pnSize;
  486.     short pnMode;
  487.     PixPatHandle pnPixPat;              /*pen's pattern*/
  488.     PixPatHandle fillPixPat;            /*fill pattern*/
  489.     short pnVis;
  490.     short txFont;
  491.     Style txFace;                       /*txFace is unpacked byte  push as short*/
  492.     char filler;
  493.     short txMode;
  494.     short txSize;
  495.     Fixed spExtra;
  496.     long fgColor;
  497.     long bkColor;
  498.     short colrBit;
  499.     short patStretch;
  500.     Handle picSave;
  501.     Handle rgnSave;
  502.     Handle polySave;
  503.     CQDProcsPtr grafProcs;
  504. };
  505.  
  506. typedef struct CGrafPort CGrafPort;
  507. typedef CGrafPort *CGrafPtr;
  508.  
  509.  
  510. typedef CGrafPtr CWindowPtr;
  511.  
  512. struct ReqListRec {
  513.     short reqLSize;                     /*request list size*/
  514.     short reqLData[1];                  /*request list data*/
  515. };
  516.  
  517. typedef struct ReqListRec ReqListRec;
  518.  
  519. struct OpenCPicParams {
  520.     Rect srcRect;
  521.     Fixed hRes;
  522.     Fixed vRes;
  523.     short version;
  524.     short reserved1;
  525.     long reserved2;
  526. };
  527.  
  528. typedef struct OpenCPicParams OpenCPicParams;
  529.  
  530.  
  531. typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice,  long userData);
  532.  
  533. extern struct  {
  534. char privates[76];
  535. long randSeed;
  536. BitMap screenBits;
  537. Cursor arrow;
  538. Pattern dkGray;
  539. Pattern ltGray;
  540. Pattern gray;
  541. Pattern black;
  542. Pattern white;
  543. GrafPtr thePort;
  544. }qd;
  545.  
  546.  
  547. #ifdef __cplusplus
  548. extern "C" {
  549. #endif
  550. pascal void InitGraf(void * globalPtr)
  551.     = 0xA86E; 
  552. pascal void OpenPort(GrafPtr port)
  553.     = 0xA86F; 
  554. pascal void InitPort(GrafPtr port)
  555.     = 0xA86D; 
  556. pascal void ClosePort(GrafPtr port)
  557.     = 0xA87D; 
  558. pascal void SetPort(GrafPtr port)
  559.     = 0xA873; 
  560. pascal void GetPort(GrafPtr *port)
  561.     = 0xA874; 
  562. pascal void GrafDevice(short device)
  563.     = 0xA872; 
  564. pascal void SetPortBits(const BitMap *bm)
  565.     = 0xA875; 
  566. pascal void PortSize(short width,short height)
  567.     = 0xA876; 
  568. pascal void MovePortTo(short leftGlobal,short topGlobal)
  569.     = 0xA877; 
  570. pascal void SetOrigin(short h,short v)
  571.     = 0xA878; 
  572. pascal void SetClip(RgnHandle rgn)
  573.     = 0xA879; 
  574. pascal void GetClip(RgnHandle rgn)
  575.     = 0xA87A; 
  576. pascal void ClipRect(const Rect *r)
  577.     = 0xA87B; 
  578. pascal void BackPat(ConstPatternParam pat)
  579.     = 0xA87C; 
  580. pascal void InitCursor(void)
  581.     = 0xA850; 
  582. pascal void SetCursor(const Cursor *crsr)
  583.     = 0xA851; 
  584. pascal void HideCursor(void)
  585.     = 0xA852; 
  586. pascal void ShowCursor(void)
  587.     = 0xA853; 
  588. pascal void ObscureCursor(void)
  589.     = 0xA856; 
  590. pascal void HidePen(void)
  591.     = 0xA896; 
  592. pascal void ShowPen(void)
  593.     = 0xA897; 
  594. pascal void GetPen(Point *pt)
  595.     = 0xA89A; 
  596. pascal void GetPenState(PenState *pnState)
  597.     = 0xA898; 
  598. pascal void SetPenState(const PenState *pnState)
  599.     = 0xA899; 
  600. pascal void PenSize(short width,short height)
  601.     = 0xA89B; 
  602. pascal void PenMode(short mode)
  603.     = 0xA89C; 
  604. pascal void PenPat(ConstPatternParam pat)
  605.     = 0xA89D; 
  606. pascal void PenNormal(void)
  607.     = 0xA89E; 
  608. pascal void MoveTo(short h,short v)
  609.     = 0xA893; 
  610. pascal void Move(short dh,short dv)
  611.     = 0xA894; 
  612. pascal void LineTo(short h,short v)
  613.     = 0xA891; 
  614. pascal void Line(short dh,short dv)
  615.     = 0xA892; 
  616. pascal void TextFont(short font)
  617.     = 0xA887; 
  618. pascal void TextFace(short face)
  619.     = 0xA888; 
  620. pascal void TextMode(short mode)
  621.     = 0xA889; 
  622. pascal void TextSize(short size)
  623.     = 0xA88A; 
  624. pascal void SpaceExtra(Fixed extra)
  625.     = 0xA88E; 
  626. pascal void DrawChar(short ch)
  627.     = 0xA883; 
  628. pascal void DrawString(ConstStr255Param s)
  629.     = 0xA884; 
  630. pascal void DrawText(const void *textBuf,short firstByte,short byteCount)
  631.     = 0xA885; 
  632. pascal short CharWidth(short ch)
  633.     = 0xA88D; 
  634. pascal short StringWidth(ConstStr255Param s)
  635.     = 0xA88C; 
  636. pascal short TextWidth(const void *textBuf,short firstByte,short byteCount)
  637.     = 0xA886; 
  638. pascal void MeasureText(short count,const void *textAddr,void *charLocs)
  639.     = 0xA837; 
  640. pascal void GetFontInfo(FontInfo *info)
  641.     = 0xA88B; 
  642. pascal void ForeColor(long color)
  643.     = 0xA862; 
  644. pascal void BackColor(long color)
  645.     = 0xA863; 
  646. pascal void ColorBit(short whichBit)
  647.     = 0xA864; 
  648. pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
  649.     = 0xA8A7; 
  650. pascal void OffsetRect(Rect *r,short dh,short dv)
  651.     = 0xA8A8; 
  652. pascal void InsetRect(Rect *r,short dh,short dv)
  653.     = 0xA8A9; 
  654. pascal Boolean SectRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  655.     = 0xA8AA; 
  656. pascal void UnionRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  657.     = 0xA8AB; 
  658. pascal Boolean EqualRect(const Rect *rect1,const Rect *rect2)
  659.     = 0xA8A6; 
  660. pascal Boolean EmptyRect(const Rect *r)
  661.     = 0xA8AE; 
  662. pascal void FrameRect(const Rect *r)
  663.     = 0xA8A1; 
  664. pascal void PaintRect(const Rect *r)
  665.     = 0xA8A2; 
  666. pascal void EraseRect(const Rect *r)
  667.     = 0xA8A3; 
  668. pascal void InvertRect(const Rect *r)
  669.     = 0xA8A4; 
  670. pascal void FillRect(const Rect *r,ConstPatternParam pat)
  671.     = 0xA8A5; 
  672. pascal void FrameOval(const Rect *r)
  673.     = 0xA8B7; 
  674. pascal void PaintOval(const Rect *r)
  675.     = 0xA8B8; 
  676. pascal void EraseOval(const Rect *r)
  677.     = 0xA8B9; 
  678. pascal void InvertOval(const Rect *r)
  679.     = 0xA8BA; 
  680. pascal void FillOval(const Rect *r,ConstPatternParam pat)
  681.     = 0xA8BB; 
  682. pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  683.     = 0xA8B0; 
  684. pascal void PaintRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  685.     = 0xA8B1; 
  686. pascal void EraseRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  687.     = 0xA8B2; 
  688. pascal void InvertRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  689.     = 0xA8B3; 
  690. pascal void FillRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  691.     ConstPatternParam pat)
  692.     = 0xA8B4; 
  693. pascal void FrameArc(const Rect *r,short startAngle,short arcAngle)
  694.     = 0xA8BE; 
  695. pascal void PaintArc(const Rect *r,short startAngle,short arcAngle)
  696.     = 0xA8BF; 
  697. pascal void EraseArc(const Rect *r,short startAngle,short arcAngle)
  698.     = 0xA8C0; 
  699. pascal void InvertArc(const Rect *r,short startAngle,short arcAngle)
  700.     = 0xA8C1; 
  701. pascal void FillArc(const Rect *r,short startAngle,short arcAngle,ConstPatternParam pat)
  702.     = 0xA8C2; 
  703. pascal RgnHandle NewRgn(void)
  704.     = 0xA8D8; 
  705. pascal void OpenRgn(void)
  706.     = 0xA8DA; 
  707. pascal void CloseRgn(RgnHandle dstRgn)
  708.     = 0xA8DB; 
  709. pascal OSErr BitMapToRegionGlue(RgnHandle region,const BitMap *bMap); 
  710. pascal OSErr BitMapToRegion(RgnHandle region,const BitMap *bMap)
  711.     = 0xA8D7; 
  712. pascal void DisposeRgn(RgnHandle rgn)
  713.     = 0xA8D9; 
  714. pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
  715.     = 0xA8DC; 
  716. pascal void SetEmptyRgn(RgnHandle rgn)
  717.     = 0xA8DD; 
  718. pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
  719.     = 0xA8DE; 
  720. pascal void RectRgn(RgnHandle rgn,const Rect *r)
  721.     = 0xA8DF; 
  722. pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
  723.     = 0xA8E0; 
  724. pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
  725.     = 0xA8E1; 
  726. pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  727.     = 0xA8E4; 
  728. pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  729.     = 0xA8E5; 
  730. pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  731.     = 0xA8E6; 
  732. pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  733.     = 0xA8E7; 
  734. pascal Boolean RectInRgn(const Rect *r,RgnHandle rgn)
  735.     = 0xA8E9; 
  736. pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
  737.     = 0xA8E3; 
  738. pascal Boolean EmptyRgn(RgnHandle rgn)
  739.     = 0xA8E2; 
  740. pascal void FrameRgn(RgnHandle rgn)
  741.     = 0xA8D2; 
  742. pascal void PaintRgn(RgnHandle rgn)
  743.     = 0xA8D3; 
  744. pascal void EraseRgn(RgnHandle rgn)
  745.     = 0xA8D4; 
  746. pascal void InvertRgn(RgnHandle rgn)
  747.     = 0xA8D5; 
  748. pascal void FillRgn(RgnHandle rgn,ConstPatternParam pat)
  749.     = 0xA8D6; 
  750. pascal void ScrollRect(const Rect *r,short dh,short dv,RgnHandle updateRgn)
  751.     = 0xA8EF; 
  752. pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  753.     const Rect *dstRect,short mode,RgnHandle maskRgn)
  754.     = 0xA8EC; 
  755. pascal void SeedFill(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  756.     short height,short words,short seedH,short seedV)
  757.     = 0xA839; 
  758. pascal void CalcMask(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  759.     short height,short words)
  760.     = 0xA838; 
  761. pascal void CopyMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  762.     const Rect *srcRect,const Rect *maskRect,const Rect *dstRect)
  763.     = 0xA817; 
  764. pascal PicHandle OpenPicture(const Rect *picFrame)
  765.     = 0xA8F3; 
  766. pascal void PicComment(short kind,short dataSize,Handle dataHandle)
  767.     = 0xA8F2; 
  768. pascal void ClosePicture(void)
  769.     = 0xA8F4; 
  770. pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
  771.     = 0xA8F6; 
  772. pascal void KillPicture(PicHandle myPicture)
  773.     = 0xA8F5; 
  774. pascal PolyHandle OpenPoly(void)
  775.     = 0xA8CB; 
  776. pascal void ClosePoly(void)
  777.     = 0xA8CC; 
  778. pascal void KillPoly(PolyHandle poly)
  779.     = 0xA8CD; 
  780. pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
  781.     = 0xA8CE; 
  782. pascal void FramePoly(PolyHandle poly)
  783.     = 0xA8C6; 
  784. pascal void PaintPoly(PolyHandle poly)
  785.     = 0xA8C7; 
  786. pascal void ErasePoly(PolyHandle poly)
  787.     = 0xA8C8; 
  788. pascal void InvertPoly(PolyHandle poly)
  789.     = 0xA8C9; 
  790. pascal void FillPoly(PolyHandle poly,ConstPatternParam pat)
  791.     = 0xA8CA; 
  792. pascal void SetPt(Point *pt,short h,short v)
  793.     = 0xA880; 
  794. pascal void LocalToGlobal(Point *pt)
  795.     = 0xA870; 
  796. pascal void GlobalToLocal(Point *pt)
  797.     = 0xA871; 
  798. pascal short Random(void)
  799.     = 0xA861; 
  800. pascal void StuffHex(void *thingPtr,ConstStr255Param s)
  801.     = 0xA866; 
  802. pascal Boolean GetPixel(short h,short v)
  803.     = 0xA865; 
  804. pascal void ScalePt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  805.     = 0xA8F8; 
  806. pascal void MapPt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  807.     = 0xA8F9; 
  808. pascal void MapRect(Rect *r,const Rect *srcRect,const Rect *dstRect)
  809.     = 0xA8FA; 
  810. pascal void MapRgn(RgnHandle rgn,const Rect *srcRect,const Rect *dstRect)
  811.     = 0xA8FB; 
  812. pascal void MapPoly(PolyHandle poly,const Rect *srcRect,const Rect *dstRect)
  813.     = 0xA8FC; 
  814. pascal void SetStdProcs(QDProcs *procs)
  815.     = 0xA8EA; 
  816. pascal void StdRect(GrafVerb verb,const Rect *r)
  817.     = 0xA8A0; 
  818. pascal void StdRRect(GrafVerb verb,const Rect *r,short ovalWidth,short ovalHeight)
  819.     = 0xA8AF; 
  820. pascal void StdOval(GrafVerb verb,const Rect *r)
  821.     = 0xA8B6; 
  822. pascal void StdArc(GrafVerb verb,const Rect *r,short startAngle,short arcAngle)
  823.     = 0xA8BD; 
  824. pascal void StdPoly(GrafVerb verb,PolyHandle poly)
  825.     = 0xA8C5; 
  826. pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
  827.     = 0xA8D1; 
  828. pascal void StdBits(const BitMap *srcBits,const Rect *srcRect,const Rect *dstRect,
  829.     short mode,RgnHandle maskRgn)
  830.     = 0xA8EB; 
  831. pascal void StdComment(short kind,short dataSize,Handle dataHandle)
  832.     = 0xA8F1; 
  833. pascal short StdTxMeas(short byteCount,const void *textAddr,Point *numer,
  834.     Point *denom,FontInfo *info)
  835.     = 0xA8ED; 
  836. pascal void StdGetPic(void *dataPtr,short byteCount)
  837.     = 0xA8EE; 
  838. pascal void StdPutPic(const void *dataPtr,short byteCount)
  839.     = 0xA8F0; 
  840. pascal void AddPt(Point src,Point *dst)
  841.     = 0xA87E; 
  842. void subpt(Point *src,Point *dst); 
  843. pascal Boolean EqualPt(Point pt1,Point pt2)
  844.     = 0xA881; 
  845. pascal Boolean PtInRect(Point pt,const Rect *r)
  846.     = 0xA8AD; 
  847. pascal void Pt2Rect(Point pt1,Point pt2,Rect *dstRect)
  848.     = 0xA8AC; 
  849. pascal void PtToAngle(const Rect *r,Point pt,short *angle)
  850.     = 0xA8C3; 
  851. pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
  852.     = 0xA8E8; 
  853. pascal void StdText(short count,const void *textAddr,Point numer,Point denom)
  854.     = 0xA882; 
  855. pascal void StdLine(Point newPt)
  856.     = 0xA890; 
  857. pascal void OpenCPort(CGrafPtr port)
  858.     = 0xAA00; 
  859. pascal void InitCPort(CGrafPtr port)
  860.     = 0xAA01; 
  861. pascal void CloseCPort(CGrafPtr port)
  862.     = 0xA87D; 
  863. pascal PixMapHandle NewPixMap(void)
  864.     = 0xAA03; 
  865. pascal void DisposPixMap(PixMapHandle pm)
  866.     = 0xAA04; 
  867. pascal void DisposePixMap(PixMapHandle pm)
  868.     = 0xAA04; 
  869. pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
  870.     = 0xAA05; 
  871. pascal PixPatHandle NewPixPat(void)
  872.     = 0xAA07; 
  873. pascal void DisposPixPat(PixPatHandle pp)
  874.     = 0xAA08; 
  875. pascal void DisposePixPat(PixPatHandle pp)
  876.     = 0xAA08; 
  877. pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
  878.     = 0xAA09; 
  879. pascal void PenPixPat(PixPatHandle pp)
  880.     = 0xAA0A; 
  881. pascal void BackPixPat(PixPatHandle pp)
  882.     = 0xAA0B; 
  883. pascal PixPatHandle GetPixPat(short patID)
  884.     = 0xAA0C; 
  885. pascal void MakeRGBPat(PixPatHandle pp,const RGBColor *myColor)
  886.     = 0xAA0D; 
  887. pascal void FillCRect(const Rect *r,PixPatHandle pp)
  888.     = 0xAA0E; 
  889. pascal void FillCOval(const Rect *r,PixPatHandle pp)
  890.     = 0xAA0F; 
  891. pascal void FillCRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  892.     PixPatHandle pp)
  893.     = 0xAA10; 
  894. pascal void FillCArc(const Rect *r,short startAngle,short arcAngle,PixPatHandle pp)
  895.     = 0xAA11; 
  896. pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
  897.     = 0xAA12; 
  898. pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
  899.     = 0xAA13; 
  900. pascal void RGBForeColor(const RGBColor *color)
  901.     = 0xAA14; 
  902. pascal void RGBBackColor(const RGBColor *color)
  903.     = 0xAA15; 
  904. pascal void SetCPixel(short h,short v,const RGBColor *cPix)
  905.     = 0xAA16; 
  906. pascal void SetPortPix(PixMapHandle pm)
  907.     = 0xAA06; 
  908. pascal void GetCPixel(short h,short v,RGBColor *cPix)
  909.     = 0xAA17; 
  910. pascal void GetForeColor(RGBColor *color)
  911.     = 0xAA19; 
  912. pascal void GetBackColor(RGBColor *color)
  913.     = 0xAA1A; 
  914. pascal void SeedCFill(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  915.     const Rect *dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
  916.     long matchData)
  917.     = 0xAA50; 
  918. pascal void CalcCMask(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  919.     const Rect *dstRect,const RGBColor *seedRGB,ColorSearchProcPtr matchProc,
  920.     long matchData)
  921.     = 0xAA4F; 
  922. pascal PicHandle OpenCPicture(const OpenCPicParams *newHeader)
  923.     = 0xAA20; 
  924. pascal void OpColor(const RGBColor *color)
  925.     = 0xAA21; 
  926. pascal void HiliteColor(const RGBColor *color)
  927.     = 0xAA22; 
  928. pascal void DisposCTable(CTabHandle cTable)
  929.     = 0xAA24; 
  930. pascal void DisposeCTable(CTabHandle cTable)
  931.     = 0xAA24; 
  932. pascal CTabHandle GetCTable(short ctID)
  933.     = 0xAA18; 
  934. pascal CCrsrHandle GetCCursor(short crsrID)
  935.     = 0xAA1B; 
  936. pascal void SetCCursor(CCrsrHandle cCrsr)
  937.     = 0xAA1C; 
  938. pascal void AllocCursor(void)
  939.     = 0xAA1D; 
  940. pascal void DisposCCursor(CCrsrHandle cCrsr)
  941.     = 0xAA26; 
  942. pascal void DisposeCCursor(CCrsrHandle cCrsr)
  943.     = 0xAA26; 
  944. pascal CIconHandle GetCIcon(short iconID)
  945.     = 0xAA1E; 
  946. pascal void PlotCIcon(const Rect *theRect,CIconHandle theIcon)
  947.     = 0xAA1F; 
  948. pascal void DisposCIcon(CIconHandle theIcon)
  949.     = 0xAA25; 
  950. pascal void DisposeCIcon(CIconHandle theIcon)
  951.     = 0xAA25; 
  952. pascal void SetStdCProcs(CQDProcs *procs)
  953.     = 0xAA4E; 
  954. pascal void CharExtra(Fixed extra)
  955.     = 0xAA23; 
  956. pascal GDHandle GetMaxDevice(const Rect *globalRect)
  957.     = 0xAA27; 
  958. pascal long GetCTSeed(void)
  959.     = 0xAA28; 
  960. pascal GDHandle GetDeviceList(void)
  961.     = 0xAA29; 
  962. pascal GDHandle GetMainDevice(void)
  963.     = 0xAA2A; 
  964. pascal GDHandle GetNextDevice(GDHandle curDevice)
  965.     = 0xAA2B; 
  966. pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
  967.     = 0xAA2C; 
  968. pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
  969.     = 0xAA2D; 
  970. pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
  971.     = 0xAA2E; 
  972. pascal GDHandle NewGDevice(short refNum,long mode)
  973.     = 0xAA2F; 
  974. pascal void DisposGDevice(GDHandle gdh)
  975.     = 0xAA30; 
  976. pascal void DisposeGDevice(GDHandle gdh)
  977.     = 0xAA30; 
  978. pascal void SetGDevice(GDHandle gd)
  979.     = 0xAA31; 
  980. pascal GDHandle GetGDevice(void)
  981.     = 0xAA32; 
  982. pascal long Color2Index(const RGBColor *myColor)
  983.     = 0xAA33; 
  984. pascal void Index2Color(long index,RGBColor *aColor)
  985.     = 0xAA34; 
  986. pascal void InvertColor(RGBColor *myColor)
  987.     = 0xAA35; 
  988. pascal Boolean RealColor(const RGBColor *color)
  989.     = 0xAA36; 
  990. pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
  991.     = 0xAA37; 
  992. pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
  993.     = 0xAA39; 
  994. pascal void AddSearch(ColorSearchProcPtr searchProc)
  995.     = 0xAA3A; 
  996. pascal void AddComp(ColorComplementProcPtr compProc)
  997.     = 0xAA3B; 
  998. pascal void DelSearch(ColorSearchProcPtr searchProc)
  999.     = 0xAA4C; 
  1000. pascal void DelComp(ColorComplementProcPtr compProc)
  1001.     = 0xAA4D; 
  1002. pascal void SubPt(Point src,Point *dst)
  1003.     = 0xA87F; 
  1004. pascal void SetClientID(short id)
  1005.     = 0xAA3C; 
  1006. pascal void ProtectEntry(short index,Boolean protect)
  1007.     = 0xAA3D; 
  1008. Boolean equalpt(Point *pt1,Point *pt2); 
  1009. pascal void ReserveEntry(short index,Boolean reserve)
  1010.     = 0xAA3E; 
  1011. pascal void SetEntries(short start,short count,CSpecArray aTable)
  1012.     = 0xAA3F; 
  1013. Boolean ptinrect(Point *pt,const Rect *r); 
  1014. pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec *selection)
  1015.     = 0xAA49; 
  1016. pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec *selection)
  1017.     = 0xAA4A; 
  1018. void pt2rect(Point *pt1,Point *pt2,const Rect *destRect); 
  1019. pascal short QDError(void)
  1020.     = 0xAA40; 
  1021. pascal void CopyDeepMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  1022.     const Rect *srcRect,const Rect *maskRect,const Rect *dstRect,short mode,
  1023.     RgnHandle maskRgn)
  1024.     = 0xAA51; 
  1025. pascal void DeviceLoop(RgnHandle drawingRgn,DeviceLoopDrawingProcPtr drawingProc,
  1026.     long userData,DeviceLoopFlags flags)
  1027.     = 0xABCA; 
  1028. #pragma parameter __A0 GetMaskTable
  1029. pascal Ptr GetMaskTable(void)
  1030.     = 0xA836; 
  1031. void pttoangle(const Rect *r,Point *pt,short *angle); 
  1032. Boolean ptinrgn(Point *pt,RgnHandle rgn); 
  1033. void stdtext(short count,const void *textAddr,Point *numer,Point *denom); 
  1034. void stdline(Point *newPt); 
  1035. void drawstring(char *s); 
  1036. void addpt(Point *src,Point *dst); 
  1037. void stuffhex(Ptr thingPtr,char *s); 
  1038. short stringwidth(char *s); 
  1039. #ifdef __cplusplus
  1040. }
  1041. #endif
  1042.  
  1043. #endif
  1044.